﻿<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="SearchStockHistory.aspx.cs" Inherits="SearchStockHistory" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="javascript" type="text/javascript">
</script>
<div class="title">
        <span class="pageTitle">جستجوی تاریخچه کالا</span>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    </div>
    
    <div><hr id="HR1" onclick="return HR1_onclick()" />

        <table width="70%">
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="نام کالا"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtName" runat="server" MaxLength="50" Width="148px"></asp:TextBox>
                    </td>
                <td>
                    <asp:Label ID="Label6" runat="server" Text="وضعیت"></asp:Label></td>
                <td>
                    <asp:DropDownList ID="ddlStatus" runat="server" Width="153px" OnDataBound="ddlStatus_DataBound">
                        <asp:ListItem Selected="True" Value="0">---</asp:ListItem>
                    </asp:DropDownList>&nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="شماره سریال" Width="76px"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtSerial" runat="server" Width="148px"></asp:TextBox></td>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="شماره سطل" Width="68px"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtBinNumber" runat="server"></asp:TextBox>&nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label7" runat="server" Text="تحویل گیرنده"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtEmpID" runat="server"></asp:TextBox></td>
                <td>
                    <asp:Label ID="Label4" runat="server" Text="تاریخ خروج"></asp:Label></td>
                <td>
                 <ajaxtoolkit:maskededitextender id="meeStartDate" runat="server" acceptnegative="Left"
                        culturename="fa-IR" mask="9999/99/99" masktype="None" messagevalidatortip="true"
                        onfocuscssclass="MaskedEditFocus" oninvalidcssclass="MaskedEditError" targetcontrolid="txtExitDate">
    </ajaxToolkit:maskededitextender>
    &nbsp;<asp:TextBox ID="txtExitDate" runat="server" Style="direction: ltr; text-align: left"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="تاریخ برگشت"></asp:Label></td>
                <td>
    <ajaxtoolkit:maskededitextender id="Maskededitextender1" runat="server" acceptnegative="Left"
                        culturename="fa-IR" mask="9999/99/99" masktype="None" messagevalidatortip="true"
                        onfocuscssclass="MaskedEditFocus" oninvalidcssclass="MaskedEditError" targetcontrolid="txtReturnDate">
    </ajaxToolkit:maskededitextender>
    <asp:TextBox ID="txtReturnDate" runat="server" Style="direction: ltr; text-align: left"></asp:TextBox></td>
                <td>
                </td>
                <td>
                    <asp:Button ID="btnSearch" runat="server" Text="جستجو" OnClick="btnSearch_Click" /></td>
            </tr>
            <tr>
                <td colspan="4" style="height: 465px">
                    <table width="100%">
                        <tr>
                            <td style="height: 21px">
                            <asp:Label ID="lblRowCount" runat="server" Text="0"></asp:Label>
                                <asp:Label ID="lblMsg" runat="server" Text="موردی یافت شد "></asp:Label></td>
                        </tr>
                        <tr>
                            <td style="height: 173px">
                                <mani:PagingGridView ID="grdStockHistory" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" OnRowCommand="grdStockHistory_RowCommand" OnPageIndexChanging="grdStockHistory_PageIndexChanging" PageSize="15">
                                    <Columns>
                                        <asp:BoundField DataField="Id" HeaderText="کد کالا" SortExpression="Desc" />
                                        <asp:BoundField HeaderText="نام کالا" DataField="name" />
                                        <asp:BoundField HeaderText="شماره سطل" DataField="binNumber" />
                                        <asp:BoundField HeaderText="سریال" DataField="serial" />
                                        <asp:BoundField HeaderText="تحویل گیرنده" DataField="empId" />
                                        <asp:BoundField HeaderText="وضعیت" DataField="status" />
                                        <asp:BoundField DataField="exitDate" HeaderText="تاریخ خروج" />

                                        <asp:BoundField HeaderText="تاریخ برگشت" DataField="returnDate" />
                                        <asp:BoundField HeaderText="مورد استفاده" DataField="usage" />
                                        <asp:BoundField HeaderText="توضیحات" DataField="desc" />
                                        <asp:CommandField SelectText="انتخاب" ShowSelectButton="True" />
                                    </Columns>
                                    <PagerSettings Mode="NumericFirstLast" />
                                </mani:PagingGridView>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label12" runat="server" Text="کد"></asp:Label><asp:Label ID="lblGoodID"
                                    runat="server" BackColor="White" Text="-"></asp:Label><br />
                                <asp:Label ID="Label16" runat="server" Text="تعداد موجود در انبار"></asp:Label>
                                <asp:Label ID="lblQty" runat="server" BackColor="White" Text="0"></asp:Label></td>
                        </tr>
                    </table>
                    <asp:Panel ID="pnlGoods" runat="server" GroupingText="ویرایش وضعیت کالا">
                        &nbsp;<table width="90%">
                            <tr>
                                <td>
                                    <asp:Label ID="Label8" runat="server" Text="نام کالا"></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="txtRGoodName" runat="server" MaxLength="50" ReadOnly="True"></asp:TextBox></td>
                                <td>
                                    <asp:Label ID="Label9" runat="server" Text="شماره سریال"></asp:Label></td>
                                <td style="width: 132px">
                                    <asp:TextBox ID="txtRGoodSerial" runat="server" ReadOnly="True" Width="116px"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td style="height: 26px">
                                    <asp:Label ID="Label11" runat="server" Text="تحویل گیرنده" Width="91px"></asp:Label></td>
                                <td style="height: 26px">
                                    <asp:TextBox ID="txtREmpId" runat="server" Width="145px" ReadOnly="True"></asp:TextBox>&nbsp;
                                </td>
                                <td style="height: 26px">
                                    <asp:Label ID="Label10" runat="server" Text="شماره سطل"></asp:Label></td>
                                <td colspan="1" style="width: 132px; height: 26px;">
                                    &nbsp;<asp:TextBox ID="txtRGoodBinNo" runat="server" ReadOnly="True" Width="106px"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td style="height: 40px">
                                    <asp:Label ID="Label14" runat="server" Text="توضیحات"></asp:Label></td>
                                <td style="height: 40px">
                                    <asp:TextBox ID="txtRGoodDesc" runat="server" TextMode="MultiLine" Width="192px"></asp:TextBox></td>
                                <td style="height: 40px">
                                    <asp:Label ID="Label15" runat="server" Text="وضعیت"></asp:Label></td>
                                <td colspan="1" style="height: 40px; width: 132px;">
                                    <asp:DropDownList ID="ddlStockStatus" runat="server" Width="129px">
                                    </asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td style="height: 40px">
                                    <asp:Label ID="Label13" runat="server" Text="مورد استفاده"></asp:Label></td>
                                <td style="height: 40px">
                                    <asp:TextBox ID="txtRGoodUsage" runat="server" AutoCompleteType="Search" Width="192px" ReadOnly="True" TextMode="MultiLine"></asp:TextBox></td>
                                <td style="height: 40px">
                                    <asp:Button ID="btnSave" runat="server"  Text="ذخیره" ValidationGroup="Goods" OnClick="btnSave_Click" /></td>
                                <td colspan="1" style="width: 132px; height: 40px">
                                </td>
                            </tr>
                        </table>
                        &nbsp; &nbsp;&nbsp;
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                </td>
            </tr>
            <tr>
                <td colspan="4" style="height: 26px">
                </td>
            </tr>

</table>

</div>

</asp:Content>
